/*
 * Copyright (c) 2006-2021, Ulandlink Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-11-24     xpw         first version
 * 2023-02-20     xpw         sync
 */
#ifndef __HTTP_SRV_H__
#define __HTTP_SRV_H__

#if HTTP_SERVER_ENABLE

#ifdef __cplusplus
 extern "C" {
#endif

#include <rtthread.h>
#include "os_types.h"

#define WEB_OCPP_URL_CHANGED_EVENT           (1<<0)

#define HTTP_SERVER_EVENT_SET               WEB_OCPP_URL_CHANGED_EVENT
                             
#define HTTP_SERVER_EVENT_OPT_FLAG         (RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR)

rt_bool_t is_server_socket(int socket);
void http_server_event_send(uint32_t event);
void http_server_event_recv(uint32_t event_set, rt_int32_t timeout, uint32_t *recv_event);

#ifdef __cplusplus
}
#endif

#endif
#endif